package com.fs.sw.dao;

import com.fs.sw.common.jpa.repository.BaseRepository;
import com.fs.sw.pojo.Roles;
import org.springframework.data.jpa.repository.EntityGraph;

import java.util.List;

/**
 * RolesRepository
 *
 *
 */
public interface RolesRepository extends BaseRepository<Roles,Integer> {

    @EntityGraph(value = "roles-users-menu", type = EntityGraph.EntityGraphType.FETCH)
    List<Roles> findByRoleid(Integer roleid);

    @EntityGraph(value = "roles-users-menu-countrys", type = EntityGraph.EntityGraphType.FETCH)
    List<Roles> findByRolename(String rolename);
}
